import React from 'react'
import Admin from './views/admin'
import Login from './views/login'
import {Switch,Route,Redirect} from 'react-router-dom'
import yztoken from './uitls/yztoken'
import store from './store'
import {Provider} from 'react-redux'
function App() {
  return (
    <Provider store={store}>
    <div>
      <Switch>
        <Route path='/login' component={Login}/>
        <Route path='/admin' component={Admin}/>
        <Redirect from='/' exact to='/login'/>
      </Switch>
    </div>
    </Provider>
  )
}
export default yztoken(App)
